package com.lrh.just.service;

import com.lrh.just.dao.JustUserMapper;
import com.lrh.just.po.JustUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ling
 * @date 2022--02--10
 */
@Service
@Slf4j
public class UserService {

    /**
     * 用户表dao
     */
    @Resource
    private JustUserMapper justUserMapper;

    /**
     * 获取用户信息
     * @param userId 用户id
     * @return 用户信息
     */
    public JustUser getUser(Integer userId){
        log.info("用户id为:{}",userId);
        return justUserMapper.getUser(userId);
    }
}
